cmake_minimum_required (VERSION 3.23)
project (demo)
aux_source_directory(./src SRC)
include_directories(./inc)
add_library(guss_shared SHARED ${SRC})
set_target_properties(guss_shared PROPERTIES OUTPUT_NAME "myfunc")
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../lib)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../bin)
find_library(myguss myfunc ${PROJECT_BINARY_DIR}/../lib)
add_executable(${PROJECT_NAME} demo24_main.cpp)
target_link_libraries(${PROJECT_NAME} ${myguss})